local BlockWorld = commonlib.gettable("BlockEngine.BlockWorld");

local BlockEngineApplication = commonlib.inherit(commonlib.Application);


function BlockEngineApplication:ctor()
    self.m_world = BlockWorld:new():Init():GetRawWorld();
end

function BlockEngineApplication:OnRender()
    self.m_world:Render();
end

function BlockEngineApplication:OnMouseDown(mouse_x, mouse_y, mouse_button)
    self.m_world:OnMouseDown(mouse_x, mouse_y, mouse_button);
end

function BlockEngineApplication:OnMouseMove(mouse_x, mouse_y, mouse_button)
    self.m_world:OnMouseMove(mouse_x, mouse_y, mouse_button);
end

function BlockEngineApplication:OnMouseUp(mouse_x, mouse_y, mouse_button)
    self.m_world:OnMouseUp(mouse_x, mouse_y, mouse_button);
end

function BlockEngineApplication:OnKeyDown(keycode)
    self.m_world:OnKeyDown(keycode);
end

function BlockEngineApplication:OnKeyUp(keycode)
    self.m_world:OnKeyUp(keycode);
end

BlockEngineApplication:InitSingleton();